<%--
  Created by IntelliJ IDEA.
  User: MSI-CN
  Date: 2020/12/1
  Time: 15:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<% String path=request.getContextPath(); %>
<html>
<head>
    <title>添加车辆</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
    <script>
        function submitVerify() {
          var idNumBer=document.getElementById("inputEmail4").value;
          var phoneNum=document.getElementById("inputEmail5").value;
          var city=document.getElementById("inputCity").value;
          var state=document.getElementById("inputState").value;
          var carInfo=document.getElementById("inputAddress2").value;
          var carType=document.getElementById("inputAddress").value;
          if (idNumBer==""){
              window.alert("请输入您的身份证号码");
          }else if (phoneNum==""){
              window.alert("请输入您的电话号码");
          }else if (city==""){
              window.alert("请输入城市");
          }else if (state==""){
              window.alert("请输入区县");
          }else if (carInfo==""){
              window.alert("请输入您的车辆信息");
          }else if (carType==""){
              window.alert("请输入您的车辆型号");
          }else {
              window.alert("正在提交，请稍后");
              document.getElementById("form").submit();
          }
        }
    </script>
</head>
<body>
    <div class="card" >
        <div class="card-body" style="width: 80%;margin: 100px auto">
            <br/>
            <br/>
        <form method="post" action="<%=path%>/CarMenageMentServlet" id="form">
            <div class="form-row">
                <div class="form-group col-md-6">
                    <label for="inputEmail4">身份证号</label>
                    <input type="email" name="idNumBer" class="form-control" id="inputEmail4" placeholder="请输入您的身份证号码">
                </div>
                <div class="form-group col-md-6">
                    <label for="inputEmail4">车牌号</label>
                    <input type="email" name="phoneNum" class="form-control" id="inputEmail5" placeholder="请输入您的车牌">
                </div>
            </div>
            <div class="form-row">
                <div class="form-group col-md-6">
                    <label for="inputCity">城市</label>
                    <input type="text" name="city" class="form-control" id="inputCity">
                </div>
                <div class="form-group col-md-4">
                    <label for="inputState">区县</label>
                    <input type="text" name="state" class="form-control" id="inputState">
                </div>
                <div class="form-group col-md-2">
                    <label for="inputZip">邮编</label>
                    <input type="text" name="youbian" class="form-control" id="inputZip">
                </div>
            </div>
            <div class="form-group">
                <label for="inputAddress">详细地址</label>
                <input type="text" name="address" class="form-control" id="inputAddress" placeholder="请输入您的通讯地址">
            </div>
            <div class="form-group">
                <label for="inputAddress2">车辆型号</label>
                <input type="text" name="carType" class="form-control" id="inputAddress2" placeholder="请输入您的车辆型号">
            </div>

            <div class="form-group">
                <div class="form-check">
                    <input class="form-check-input" type="checkbox" id="gridCheck">
                    <label class="form-check-label" for="gridCheck">
                        Check me out
                    </label>
                </div>
            </div>
            <button type="button" class="btn btn-primary" onclick="submitVerify()">提交</button>
            <button type="reset" class="btn btn-primary" >清空</button>
        </form>
        </div>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
</body>
</html>
